<div id="cart" class="grid-25 tablet-grid-25 mobile-grid-100 grid-parent">
  <div class="heading">
    <!--h4><?php echo $heading_title; ?></h4-->
    <a><span class="icon">icon</span><span id="cart-total"><?php echo $text_items; ?></span></a></div>
  <div class="content">
    <?php if ($products || $vouchers) { ?>
    <div class="mini-cart-info">
		<h4><?php echo $heading_title; ?></h4>
      <table>
        <?php foreach ($products as $product) { ?>
        <tr >
          <td class="name">
		  <div>
			<?php if ($product['thumb']) { ?>
            <a class="image" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" title="<?php echo $product['name']; ?>" /></a>
            <?php } ?>
			<div class="info">
			<div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
            
              <?php foreach ($product['option'] as $option) { ?>
              - <small><?php echo $option['name']; ?> <?php echo $option['value']; ?></small><br />
              <?php } ?>
              <?php if ($product['recurring']): ?>
              - <small><?php echo $text_payment_profile ?> <?php echo $product['profile']; ?></small><br />
              <?php endif; ?>
			  <div class="total"><?php echo $product['total']; ?></div>
            </div>
		    
		  </div>
		  </td>
		  <td  class="quantity">
          x&nbsp;<?php echo $product['quantity']; ?>
		  </td>
		  <td class="remove">
          <a title="<?php echo $button_remove; ?>" onclick="(getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') ? location = 'index.php?route=checkout/cart&amp;remove=<?php echo $product['key']; ?>' : $('#cart').load('index.php?route=module/cart&amp;remove=<?php echo $product['key']; ?>' + ' #cart > *');"><?php echo $button_remove; ?></a>
	      </td>
		</tr>
        <?php } ?>
        <?php foreach ($vouchers as $voucher) { ?>
        <tr>
          <td class="name">
		  <div><span><?php echo $voucher['description']; ?></span>
		  <div class="total"><?php echo $voucher['amount']; ?></div></div>
		  </td>
          <td class="quantity">x&nbsp;1</td>
         <td class="remove"><a  onclick="(getURLVar('route') == 'checkout/cart' || getURLVar('route') == 'checkout/checkout') ? location = 'index.php?route=checkout/cart&amp;remove=<?php echo $voucher['key']; ?>' : $('#cart').load('index.php?route=module/cart&amp;remove=<?php echo $voucher['key']; ?>' + ' #cart > *');"><?php echo $button_remove; ?></a>
        </td>
		</tr>
        <?php } ?>
      </table>
    </div>
     <div class="mini-cart-total">
      <table>
        <?php foreach ($totals as $total) { ?>
        <tr>
          <td class="left<?php echo ($total==end($totals) ? ' last' : ''); ?>"><?php echo $total['title']; ?>:</td>
          <td class="right<?php echo ($total==end($totals) ? ' last' : ''); ?>"><?php echo $total['text']; ?></td>
        </tr>
        <?php } ?>
      </table>
    </div>
    <div class="checkout"><a class="button" href="<?php echo $cart; ?>"><span><?php echo $text_cart; ?></span></a> 
						  <a class="button button-grey" href="<?php echo $checkout; ?>"><span><?php echo $text_checkout; ?></span></a></div>
    <?php } else { ?>
    <div class="empty"><?php echo $text_empty; ?></div>
    <?php } ?>
  </div>
</div>

<script type="text/javascript"><!--
$(document).ready(function() {
  if(getWidthBrowser() < 959) {
    $('#cart > .heading a').live('click', function() {
      if($('#cart').hasClass('my-active')){
        $('#cart').removeClass('active');
        $('#cart').removeClass('my-active');
      } else {
        $('#cart').addClass('my-active');
      }
    });
  }
  else if(navigator.userAgent.match(/iPad/i)) {
    $('#cart > .heading a').live('click', function() {
      if($('#cart').hasClass('my-active')){
        $('#cart').removeClass('active');
        $('#cart').removeClass('my-active');
      } else {
        $('#cart').addClass('my-active');
      }
    }); 
  }
});
--></script>